<template>
  <div class="md:flex">
    <template v-for="(item, index) in growCardList" :key="item.title">
      <el-card class="md:w-1/4 w-full !md:mt-0 m-5" shadow="hover">
        <template #header>
          <div class="card-header">
            <span>{{ item.title }}</span>
            <el-tag hit> {{ item.action }}</el-tag>
          </div>
        </template>
        <div class="py-4 px-4 flex justify-between items-center">
          <CountTo prefix="$" :startVal="1" :endVal="item.value" class="text-2xl" />
          <Icon :icon="item.icon" :size="40" />
        </div>

        <div class="p-2 px-4 flex justify-between">
          <span>总{{ item.title }}</span>
          <CountTo prefix="$" :startVal="1" :endVal="item.total" />
        </div>
      </el-card>

    </template>
  </div>

</template>

<script lang="ts" setup>
import { growCardList } from '../data';
import { CountTo } from '@/components/CountTo/index';


</script>

<style lang="scss">
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>